package com.woniuxy.cloud52.cinemaassembly.controller;


import com.woniuxy.cloud.ticket52.common.result.Result;
import com.woniuxy.cloud52.MovieCinemaAPI;
import com.woniuxy.cloud52.cinemaassembly.model.Cinema;
import com.woniuxy.cloud52.cinemaassembly.model.MovieCinema;
import com.woniuxy.cloud52.cinemaassembly.model.MovieHall;
import com.woniuxy.cloud52.cinemaassembly.service.IMovieCinemaService;
import com.woniuxy.cloud52.cinemaassembly.service.IMovieHallService;
import com.woniuxy.cloud52.form.MovieCinemaForm;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 影厅电影关联表 前端控制器
 * </p>
 *
 * @author rc
 * @since 2021-05-06
 */
@RestController
@Slf4j
public class MovieCinemaController implements MovieCinemaAPI {

    @Autowired
    private IMovieCinemaService service;

    @Override
    public Result getmoviecinema(MovieCinemaForm form) {
        log.info("查询关联{}",form);
        MovieCinema movieCinema = new MovieCinema();
        BeanUtils.copyProperties(form, movieCinema);
        List<MovieCinema> any = service.findAny(movieCinema);
        return Result.success(any);
    }
}

